package app;

import datastructure.Instance;

public class GenerateInitial {
    int divide = 0;
    int numofCustomer = 0;
    int numofPFC = 0;
    int numofTask = 0;

    double a = 0;
    double b = 0;
    double Len = 0;

    double c1 = 0;
    double c2 = 0;
    double miu = 0;

    double Fi = 0;
    double Fm = 0;
    double[] delta;


    double[][] distanceMatrix;
    int[][] ODdemand;

    double[][] coordinateofPFC;
    double[][] coordinateofCustomer;
    double[][] coordinate;
    int experimentnumber = 0;
    String time;

    int[] ODdemandSequ;
    int[][] ODflow;

    int[] InitialS;

    public GenerateInitial(Instance instance, int experimentnumber, String time) {
        this.numofPFC = instance.numofPFC;
        this.divide = instance.divide;
        this.numofCustomer = instance.numofCustomer;
        this.numofTask = instance.numofTask;
        this.a = instance.a;
        this.b = instance.b;
        this.Len = instance.Len;
        this.c1 = instance.c1;
        this.c2 = instance.c2;
        this.miu = instance.miu;
        this.Fi = instance.Fi;
        this.Fm = instance.Fm;
        this.delta = instance.delta;
        this.ODdemand = instance.ODdemand;
        this.distanceMatrix = instance.distanceMatrix;
        this.coordinateofPFC = instance.coordinateofPFC;
        this.coordinateofCustomer = instance.coordinateofCustomer;
        this.experimentnumber = experimentnumber;
        this.time = time;

        this.InitialS = new int[this.numofPFC];
    }

    public int[] Initial(int[] ODdemandSequs, int[][] ODflows) {

        this.ODdemandSequ = ODdemandSequs;
        this.ODflow = ODflows;
        double[] PFCPreference = new double[this.numofPFC];

        int[] PFCindex = new int[numofPFC];

        for (int i = 0; i < divide; i++) {
            InitialS[PFCindex[i]] = 0;
        }

        return InitialS;
    }

}
